<%@ page pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="allpage.css" >
    <title>宠物诊所</title>
  </head>
  <script type="text/javascript" src="../user/table_style.js"></script>
  <script type="text/javascript" src="../user/empty_check.js"></script>
  <script language="javascript" type="text/javascript" src="../user/DatePicker/WdatePicker.js"></script>
  <body>
  <div class="background">
  <jsp:include page="suc.jsp"></jsp:include>
  	<div class="contentDiv">
	  	<form action="../servlet/PetUpdateServlet" method="post">
	  	  <input type="hidden" name="handle" value="add"/>
		  <table align="center" width="400">
		  		<tr>
		  			<td width="50%">所有人:</td>
		  			<td>
		  				<select name="owner_name">
		  					<c:forEach items="${owners}" var="oneOwner">
		  						<option value="${oneOwner.owner_id }">${oneOwner.name}</option>
		  					</c:forEach>
		  					
		  				</select>
		  			</td>
		  		</tr>
		  		<tr>
		  			<td>名称*:</td>
		  			<td><input type="text" name="pet_name" id="pet_name"/></td>
		  		</tr>
		  		<tr>
		  			<td>类型:</td>
		  			<td>
		  				<select name="type">
		  					<c:forEach items="${types}" var="oneType">
		  						<option value="${oneType.type_id }">${oneType.type}</option>
		  					</c:forEach>
		  				</select>
		  			</td>
		  		</tr>
		  		<tr>
		  			<td>生日:</td>
		  			<td><input class="Wdate" type="text" name="birthday" onClick="WdatePicker()"/></td>
		  		</tr>
		  		<tr>
		  			<td><input type="submit" value="添加" onclick="return check(document.getElementById('pet_name'),'宠物名称')"/></td>
		  			<td><input type="button" value="放弃" onclick="javascript:window.location='petsearch.jsp'" /></td>
		  		</tr>
		   </table>
		 </form>
	 </div>
  
  </div>
  </body>
</html>
